<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="images/favicon.ico">


    <title>同昌官网</title>

    <link href="js/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet">

    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <link href="js/bootstrap-3.3.7/css/ie10-viewport-bug-workaround.css" rel="stylesheet">
    <link href="js/bootstrapValidator/bootstrapValidator.css" rel="stylesheet">

    <!-- custom style-->

    <link rel="stylesheet" href="plugs/animate/animate.min.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/dqtc/dqtc.css">


    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]>
    <script src="js/bootstrap-3.3.7/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="js/bootstrap-3.3.7/js/ie-emulation-modes-warning.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="js/bootstrap-3.3.7/js/html5shiv.min.js"></script>
    <script src="js/bootstrap-3.3.7/js/respond.min.js"></script>
    <![endif]-->
</head>
<body oncontextmenu=self.event.returnValue=false onselectstart="return false">
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
    <div class="modal-dialog"  style="width:410px;">
        <div class="modal-content" style="width:410px;">
            <div class="modal-body">
                <form class="form-signin" id="loginForm">
                    <div class="header row">
                        <div class="col-xs-4"><span></span></div>
                        <div class="col-xs-4 ">网站登录</div>
                        <div class="col-xs-4"><span></span></div>
                    </div>
                    <div class="form-group">
                        <span class="userLabel">用户名 <i></i></span>
                        <input type="text" class="form-control" name="username" id="userName" required autofocus
                               placeholder="请输入用户名"/>
                    </div>
                    <div class="form-group">
                        <span class="passwordLabel">密码 <i></i></span>
                        <input type="password" class="form-control" name="password" id="password" required
                               placeholder="请输入密码"/>
                    </div>
                    <div class="form-group">
                        <button type="submit" id="submitBtn" class="btn btn-lg btn-primary btn-block">登录</button>
                    </div>
                </form>

            </div>
        </div>
    </div>
</div>
<div class="navbar-wrapper">
    <div class="container">
        <nav class="navbar  navbar-static-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                            aria-expanded="false" aria-controls="navbar">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="index.html">
                        <img alt="Brand" src="images/common/logo.png">
                    </a>
                </div>
                <div id="navbar" class="navbar-collapse collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="#">大气天成</a></li>
                        <li><a href="djff.html">大将风范</a></li>
                        <li><a href="dxwx.html">大象无形</a></li>
                        <li><a href="dcwo.html">大成无偶</a></li>
                        <li ><a href="dawj.html">大爱无疆</a></li>
                        <li><a href="dyht.html">大业宏图</a></li>
                        <ul class="nav navbar-nav pull-right">
                            <li class="loginBtn" data-toggle="modal" data-target="#myModal">登录</li>
                            <!--<li><a href="#">注册</a></li>-->
                            <li><a href="#" class="line"></a></li>
                            <!--<li><a href="#" class="searchIcon"></a></li>-->
                            <!--<li class="wxBox"><a href="#" class="weixin"></a></li>-->
                            <li class="wxBox"><a href="javascript:void(0);" class="weixin"></a><a href="javascript:void(0);" class="jtewm"></a></li>
                            <!--<li><a href="#" class="en"></a></li>-->
                        </ul>
                    </ul>
                </div>
            </div>
        </nav>
    </div>
</div>
<section class="item dqtc " style="visibility: visible; animation-name: fadeInUp;">
    <div class="dqtcContent">
        <div class="dqtcBg"></div>
        <div class="dqtcText">
            <div class="textInner">
                <div class="container">
                    <div class="textContent">
                        <div class="dqtcTextTitle">
                            <span>大</span><span>气</span><span>天</span><span>成</span>
                        </div>
                        <div class="dqtcSubtitle wow animated rubberBand">一种气势磅礴，勇担大任的魄力无限</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="item introduce wow fadeInUp animated" style="visibility: visible; animation-name: fadeInUp;">
    <div class="container">
         <div class="row introduceContent wow fadeInUp animated" style="visibility: visible; animation-name: fadeInUp;">
             <div class="col-sm-6 introduceBg  wow fadeInUp animated"></div>
             <div class="col-sm-6">
                 <div class="introduceText">
                     <div class="title ">中科同昌介绍</div>
                     <div class="subTitle">Introduction of Topchance Group </div>
                     <div class="text">中科同昌集团是致力于以软件研发为核心，综合IT咨询、IT资产运维管理、信息安全、军民融合、产学研联动为一体的高新技术企业。公司成立至今，始终致力于大数据、云计算、物联网、信息安全保障等产品的研究与开发，先后承接国家火炬计划、863课题的研究及应用等数十项国家重点工程项目建设；拥有自主知识产权、专利等200余项；是国家级软件示范企业、省级行业技术中心、省级优秀软件企业、国家千人计划试点单位等；先后与中科院、清华、北大等国内顶尖院所合作，建立了院士工作站、博士后流动站；创办同昌商学院，先后为社会培养输送专业技术人才千余人；为党政机关、科研院所、国防企业累计服务项目上万余次，形成一个集研发、教学、技术应用、产品推广为一体的科技企业新业态！！</div>
                 </div>
             </div>
         </div>
    </div>
</section>
<section class="item songAge  wow fadeInUp animated" style="visibility: visible; animation-name: fadeInUp;">
    <div class="container">
        <div class="row songAgeHeader">
            <div class="col-xs-12 ">
                <div class="row">
                    <div class="col-xs-3">
                        <div class="line"></div>
                    </div>
                    <div class="col-xs-6 ">
                        <div class="itemTitle">岁月如歌</div>
                        <small class="itemTitleEn">A song of age</small>
                    </div>
                    <div class="col-xs-3 ">
                        <div class="line "></div>
                    </div>
                </div>

            </div>
        </div>
        <div class="row songAgeContent wow animated fadeInUpBig">
            <div class="col-sm-12">
                <div class="songAgeInner">
                    <div class="shadow">
                        <div class="shadowTitle wow animated fadeInUpBig">同昌百年 百年同昌</div>
                        <div class="shadowSubtitle wow animated fadeInUpBig">一颗IT新星在三晋大地冉冉升起...</div>
                        <div class="playBtn"></div>
                        <div class="shadowBottom">
                            <div class="shadowBottomLeft item"></div>
                            <div class="shadowBottomMiddle item"></div>
                            <div class="shadowBottomRight item"></div>
                        </div>
                    </div>
                    <video style="width:100%; height:100%; object-fit: fill" class="video pause">
                        <source src="video/dqtc/video.mp4" type="video/webm">
                        <source src="video/dqtc/video.mp4" type="video/mp4">
                        对不起；您的浏览器不支持HTML5视频在WebM和VP8 / VP9或MP4
                    </video>
                </div>
            </div>
        </div>
    </div>
</section>
<footer class="footer wow fadeInUp animated" style="visibility: visible; animation-name: fadeInUp;">
    <div class="container">
        <div class="row">
            <div class="col-xs-12">
                <div class="footTitle"><img src="images/common/footerLogo.png" alt=""></div>
            </div>
        </div>
        <div class="row footContent">
            <div class="col-xs-12 col-sm-7">
                <div class="row">
                    <div class="col-xs-3">
                        <div class="footItems">关于我们</div>
                        <div class="footItem">
                            <a href="javascript:void(0)">关于同昌</a>
                            <a href="javascript:void(0)">发展历程</a>
                        </div>
                    </div>
                    <div class="col-xs-3">
                        <div class="footItems">加入我们</div>
                        <div class="footItem">
                            <a href="javascript:void(0)">社会招聘</a>
                            <a href="javascript:void(0)">校园招聘</a>
                        </div>
                    </div>
                    <div class="col-xs-3">
                        <div class="footItems">联系我们</div>
                        <div class="footItem">
                            <a href="javascript:void(0)">客户服务</a>
                            <a href="javascript:void(0)">合作洽谈</a>
                        </div>
                    </div>
                    <div class="col-xs-3">
                        <div class="footItems">服务热线</div>
                        <div class="footItem">
                            <a href="javascript:void(0)">400-653-0677</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12 col-sm-5 line">
                <div class="row">
                    <div class="col-xs-6  col-sm-5  col-sm-offset-1">
                        <div class="ewm">民生之钥</div>
                        <img src="images/common/mszy.png" alt=""></div>
                    <div class="col-xs-6 col-sm-5">
                        <div class="ewm">关注同昌</div>
                        <img src="images/common/jt.png" alt="">
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12">
                <div class="segmenLine"></div>
            </div>
        </div>
        <div class="row ">
            <div class="col-xs-12 footText">
                <div>法律声明 | 监督举报 | 网站地图 | 晋网文【2018】6138-1456号</div>
                <div>Copyright 1996 - 2018 Topchance. All Rights Reserved.中科同昌信息技术集团</div>
            </div>
        </div>
    </div>
</footer>
<div class="dialog">
    <div class="songAge dialog-songAge"></div>
</div>
<!--回到顶部-->
<div id="jumpTop"></div>
<script src="js/jquery-v1.12.4/jquery.min.js"></script>
<!--vendor-->
<script>window.jQuery || document.write('<script src="js/bootstrap-3.3.7/js/jquery.min.js"><\/script>')</script>
<script src="js/bootstrapValidator/bootstrapValidator.min.js"></script>
<script src="js/bootstrap-3.3.7/js/bootstrap.min.js"></script>
<script src="js/bootstrapValidator/zh_CN.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="js/bootstrap-3.3.7/js/ie10-viewport-bug-workaround.js"></script>
<!-- common js -->
<script src="plugs/wow/wow.min.js"></script>
<script src="js/common.js"></script>
<script src="plugs/layer/layer.js"></script><!--layer JS-->
<link rel="stylesheet" href="plugs/sweetalert2/sweetalert2.min.css">
<script src="plugs/sweetalert2/sweetalert2.all.min.js"></script>
<script>
    new WOW().init();
    $(document).ready(function () {

        var username = window.sessionStorage.username;//获取绘话中的用户名
        if (username) {
            $(".loginBtn").html(username);
            $(".loginBtn").css({"color":"#fff"});
            $(".loginBtn").attr("data-target","");
        } else {
            $(".loginBtn").html('登录');
            $(".loginBtn").attr("data-target","#myModal");
        }
        $(window).scroll(function() {
            if ($(window).scrollTop() > 300) {
                $('#jumpTop').fadeIn(800);
            } else {
                $('#jumpTop').fadeOut(800);
            }
        });
        $("#jumpTop").click(function() {
            $('body,html').animate({
                    scrollTop: 0
                },
                1000);
            return false;
        });
        //防下载
        document.onkeydown = function() {
            var e = window.event || arguments[0];
            //屏蔽F12
            if(e.keyCode == 123) {
                return false;
                //屏蔽Ctrl+Shift+I
            } else if((e.ctrlKey) && (e.shiftKey) && (e.keyCode == 73)) {
                return false;
                //屏蔽Shift+F10
            } else if((e.shiftKey) && (e.keyCode == 121)){
                return false;

            } else if(event.ctrlKey  &&  window.event.keyCode==83 ){
                return false;
            }
        };
        //屏蔽右键单击
        document.oncontextmenu = function() {
            return false;
        }
    })

    $(function () {
        var dqtcBg = $(".dqtcBg"); //背景图片容器
        var dqtcTextTitle = $(".dqtcTextTitle");//文字容器
        var video = $(".video");//获取视频播放容器
        console.log(video)  ;
        loadTextOpacity(dqtcTextTitle);
        $(document).mousemove(function (e) {
            //背景图片移动
            getMousePos(e, dqtcBg);
        });

        $('.playBtn').click(function () {
            var contbox=$('.dialog .songAge');
            contbox.html(video);
            $('body').css('overflow-y','hidden');
            layer.open({
                type: 1,
                title: false,
                area: ['100%', '100%'],
                skin: 'mylayer',
                content: $('.dialog'),
                end : function() {
                    $('body').css('overflow-y','auto');
                }
            });
            if (video.hasClass('pause')) {
                video[0].play();
                video.removeClass('pause');
                video.addClass('play');

            } else {
                video[0].pause();
                video.removeClass('play');
                video.addClass('pause');
            }
        });

        // modal  居中显示
        var $m_btn = $('.loginBtn');
        var $modal = $('#myModal');

        $modal.on('show.bs.modal', function () {
            var $this = $(this);
            var $modal_dialog = $this.find('.modal-dialog');
            // 关键代码，如没将modal设置为 block，则$modala_dialog.height() 为零
            $this.css('display', 'block');
            $modal_dialog.css({'margin-top': Math.max(0, ($(window).height() - $modal_dialog.height()) / 2)});
        });
        $('#myModal').on('shown.bs.modal', function () {
            $("#loginForm").bootstrapValidator({
                live: 'enabled',//验证时机，enabled是内容有变化就验证（默认），disabled和submitted是提交再验证
                excluded: [':disabled', ':hidden', ':not(:visible)'],//排除无需验证的控件，比如被禁用的或者被隐藏的
                submitButtons: '#submitBtn',//指定提交按钮，如果验证失败则变成disabled，但我没试成功，反而加了这句话非submit按钮也会提交到action指定页面
                message: '通用的验证失败消息',//好像从来没出现过
                feedbackIcons: {//根据验证结果显示的各种图标
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                    username: {
                        message: '用户名验证失败',
                        validators: {
                            notEmpty: {
                                message: '用户名不能为空'
                            }
                        }
                    },
                    password: {
                        validators: {
                            /* regexp: {//正则验证
                                 regexp: /^[a-zA-Z0-9_\.]+$/,
                                 message: '所输入的字符不符要求'
                             },*/
                            notEmpty: {
                                message: '密码不能为空'
                            }
                        }
                    },
                }
            });
            $("#submitBtn").click(function (e) {
                e.preventDefault();
                $("#loginForm").bootstrapValidator('validate');//提交验证
                if ($("#loginForm").data('bootstrapValidator').isValid()) {
                    var username = $.trim($("#userName").val());
                    var password = $.trim($("#password").val());
                    $.ajax({
                        url: "http://localhost/eye/a/tcoa/login/manage",
                        type: "post",
                        data: {username: username, password: password},
                        success: function (data) {
                            if (data) {
                                data = JSON.stringify(data);
                                data = JSON.parse(data);
                                if (data.loginmark == 1) {
                                    $('#myModal').modal('hide');
                                    swal(
                                        '恭喜登录成功！',
                                    );


                                    // sessionStorage.useId = data.id;
                                    // alert(id);//保存用户名id
                                    sessionStorage.username = data.username;    //保存用户名
                                    //  alert()
                                    $(".loginBtn").html(data.username);
                                    $(".loginBtn").attr("data-target"," ");
                                    $(".loginBtn").css({"color":"#fff"});
                                }
                                if (data.loginmark == 2) {
                                    swal({
                                        title: '用户名或密码填写错误登录失败!',
                                        type: 'error',
                                        confirmButtonColor: '#3085d6',
                                        cancelButtonColor: '#d33',
                                        confirmButtonText: '确定',
                                        confirmButtonClass: 'btn btn-success',
                                        buttonsStyling: false ,

                                    }).then(function () {
                                        swal(
                                            '请重新核对填写信息',
                                             'info'
                                        )
                                    });
                                    //layer.alert('用户名或密码填写错误', {icon: 2});
                                    $("#loginForm").data("bootstrapValidator").destroy();
                                    $('#loginForm').data('bootstrapValidator', null);
                                    $("#loginForm")[0].reset();
                                }
                            }
                        },
                        error: function (xhr, data) {
                            swal('发送ajax失败');
                        },
                        complete: function () {
                            $("#loginForm").data("bootstrapValidator").destroy();
                            $('#loginForm').data('bootstrapValidator', null);
                            $("#loginForm")[0].reset();
                        }
                    })
                }
            });
        });
    })
    </script>
</body>
</html>
